package Practice06.test2;

import java.util.Scanner;

public class ExceptionTest2 {


    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        try {
            while (true){
                if (num < 100){
                    throw new Exception100();
                } else if (num > 1000) {
                    throw new Exception1000();
                } else {
                    System.out.println("你输入了:"+num);
                    break;
                }

            }
        } catch (Exception1000 e) {
            throw new RuntimeException(e);
        } catch (Exception100 e) {
            throw new RuntimeException(e);
        }
    }
}
